Karma-based API on Apple Platforms by Manuel Carrasco Molina

Karma-based API on Apple Platforms by Manuel Carrasco Molina

Author:Manuel Carrasco Molina
Language: eng
Format: epub
ISBN: 9781484242919
Publisher: Apress


The Stored Object

Every combination of a quantity and a type — so, an instance — is stored as an HKObject. A child class from it, HKSample, combines:Sample type

Start Date

End Date

All Properties Are Read-Only!

Yes, you read it right — because it doesn’t make a lot of sense to change the data that was recorded yesterday.

It’s also a good decision to have immutable properties so nothing can be changed by a mean app.

That being said, you can observe when a property changes, for example, when the user became taller. For that, you can use HKObserverQuery . Speaking of which, at the core of some code, we’ll show there’s going to be an HKQuery.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.